//? 模拟接口
function inter(content,time) {
    return new Promise(resolve => {
        setTimeout(() => {
            console.log(content)
            resolve(content)
        },time)
    })
}

const inter1 = inter('one',3000)
const inter2 = inter('two',2000)
const inter3 = inter('three',1000)

async function waitThree() {
    //? 关键在于三个接口需要同时发出 等待结果不同时
    await inter1
    await inter2
    await inter3
    console.log('done')
}
waitThree()

// Promise.all([inter2,inter3,inter1]).then(res => console.log(res))
